package com.ruoyi.sts.domain;

import javax.xml.bind.annotation.*;
import java.util.Date;
import java.util.List;

@XmlRootElement(name = "EventNotificationAlert")
@XmlAccessorType(XmlAccessType.FIELD)
public class EventNotificationAlert {

    @XmlAttribute(name = "version")
    private String version;

    @XmlElement(name = "ipAddress")
    public String ipAddress;

    @XmlElement(name = "portNo")
    private int portNo;

    @XmlElement(name = "protocol")
    private String protocol;

    @XmlElement(name = "macAddress")
    private String macAddress;

    @XmlElement(name = "channelID")
    private int channelID;

    @XmlElement(name = "dateTime")
    private String dateTime;

    @XmlElement(name = "activePostCount")
    private int activePostCount;

    @XmlElement(name = "eventType")
    private String eventType;

    @XmlElement(name = "eventState")
    private String eventState;

    @XmlElement(name = "eventDescription")
    private String eventDescription;

    @XmlElement(name = "channelName")
    private String channelName;

    @XmlElement(name = "peopleCounting")
    private PeopleCounting peopleCounting;

    @XmlElementWrapper(name = "GenderList")
    @XmlElement(name = "Gender")
    private List<ValueCount> genderList;

    @XmlElementWrapper(name = "MaskList")
    @XmlElement(name = "Mask")
    private List<ValueCount> maskList;

    @XmlElementWrapper(name = "AgeGroupList")
    @XmlElement(name = "AgeGroup")
    private List<ValueCount> ageGroupList;

    @XmlElementWrapper(name = "HatList")
    @XmlElement(name = "Hat")
    private List<ValueCount> hatList;

    @XmlElementWrapper(name = "ThingsList")
    @XmlElement(name = "Things")
    private List<ValueCount> thingsList;

    @XmlElement(name = "isDataRetransmission")
    private boolean isDataRetransmission;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public int getPortNo() {
        return portNo;
    }

    public void setPortNo(int portNo) {
        this.portNo = portNo;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public int getChannelID() {
        return channelID;
    }

    public void setChannelID(int channelID) {
        this.channelID = channelID;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public int getActivePostCount() {
        return activePostCount;
    }

    public void setActivePostCount(int activePostCount) {
        this.activePostCount = activePostCount;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getEventState() {
        return eventState;
    }

    public void setEventState(String eventState) {
        this.eventState = eventState;
    }

    public String getEventDescription() {
        return eventDescription;
    }

    public void setEventDescription(String eventDescription) {
        this.eventDescription = eventDescription;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public PeopleCounting getPeopleCounting() {
        return peopleCounting;
    }

    public void setPeopleCounting(PeopleCounting peopleCounting) {
        this.peopleCounting = peopleCounting;
    }

    public List<ValueCount> getGenderList() {
        return genderList;
    }

    public void setGenderList(List<ValueCount> genderList) {
        this.genderList = genderList;
    }

    public List<ValueCount> getMaskList() {
        return maskList;
    }

    public void setMaskList(List<ValueCount> maskList) {
        this.maskList = maskList;
    }

    public List<ValueCount> getAgeGroupList() {
        return ageGroupList;
    }

    public void setAgeGroupList(List<ValueCount> ageGroupList) {
        this.ageGroupList = ageGroupList;
    }

    public List<ValueCount> getHatList() {
        return hatList;
    }

    public void setHatList(List<ValueCount> hatList) {
        this.hatList = hatList;
    }

    public List<ValueCount> getThingsList() {
        return thingsList;
    }

    public void setThingsList(List<ValueCount> thingsList) {
        this.thingsList = thingsList;
    }

    public boolean isDataRetransmission() {
        return isDataRetransmission;
    }

    public void setDataRetransmission(boolean dataRetransmission) {
        isDataRetransmission = dataRetransmission;
    }

    // Nested classes for complex types

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class PeopleCounting {
        @XmlElement(name = "statisticalMethods")
        private String statisticalMethods;

        @XmlElement(name = "TimeRange")
        private TimeRange timeRange;

        @XmlElement(name = "RealTime")
        private RealTime realTime;

        @XmlElement(name = "enter")
        private int enter;

        @XmlElement(name = "exit")
        private int exit;

        @XmlElement(name = "pass")
        private int pass;

        @XmlElement(name = "duplicatePeople")
        private int duplicatePeople;

        @XmlElement(name = "duplicateEnter")
        private int duplicateEnter;

        @XmlElement(name = "duplicateExit")
        private int duplicateExit;

        @XmlElement(name = "duplicatePass")
        private int duplicatePass;

        @XmlElementWrapper(name = "FlowStatisticsList")
        @XmlElement(name = "FlowStatistics")
        private List<FlowStatistics> flowStatisticsList;

        @XmlElement(name = "countingSceneMode")
        private String countingSceneMode;

        @XmlElement(name = "deDuplicateEnter")
        private int deDuplicateEnter;

        @XmlElement(name = "deDuplicateExit")
        private int deDuplicateExit;

        public String getStatisticalMethods() {
            return statisticalMethods;
        }

        public void setStatisticalMethods(String statisticalMethods) {
            this.statisticalMethods = statisticalMethods;
        }

        public TimeRange getTimeRange() {
            return timeRange;
        }

        public void setTimeRange(TimeRange timeRange) {
            this.timeRange = timeRange;
        }

        public RealTime getRealTime() {
            return realTime;
        }

        public void setRealTime(RealTime realTime) {
            this.realTime = realTime;
        }

        public int getEnter() {
            return enter;
        }

        public void setEnter(int enter) {
            this.enter = enter;
        }

        public int getExit() {
            return exit;
        }

        public void setExit(int exit) {
            this.exit = exit;
        }

        public int getPass() {
            return pass;
        }

        public void setPass(int pass) {
            this.pass = pass;
        }

        public int getDuplicatePeople() {
            return duplicatePeople;
        }

        public void setDuplicatePeople(int duplicatePeople) {
            this.duplicatePeople = duplicatePeople;
        }

        public int getDuplicateEnter() {
            return duplicateEnter;
        }

        public void setDuplicateEnter(int duplicateEnter) {
            this.duplicateEnter = duplicateEnter;
        }

        public int getDuplicateExit() {
            return duplicateExit;
        }

        public void setDuplicateExit(int duplicateExit) {
            this.duplicateExit = duplicateExit;
        }

        public int getDuplicatePass() {
            return duplicatePass;
        }

        public void setDuplicatePass(int duplicatePass) {
            this.duplicatePass = duplicatePass;
        }

        public List<FlowStatistics> getFlowStatisticsList() {
            return flowStatisticsList;
        }

        public void setFlowStatisticsList(List<FlowStatistics> flowStatisticsList) {
            this.flowStatisticsList = flowStatisticsList;
        }

        public String getCountingSceneMode() {
            return countingSceneMode;
        }

        public void setCountingSceneMode(String countingSceneMode) {
            this.countingSceneMode = countingSceneMode;
        }

        public int getDeDuplicateEnter() {
            return deDuplicateEnter;
        }

        public void setDeDuplicateEnter(int deDuplicateEnter) {
            this.deDuplicateEnter = deDuplicateEnter;
        }

        public int getDeDuplicateExit() {
            return deDuplicateExit;
        }

        public void setDeDuplicateExit(int deDuplicateExit) {
            this.deDuplicateExit = deDuplicateExit;
        }

        @XmlAccessorType(XmlAccessType.FIELD)
        public static class TimeRange {
            @XmlElement(name = "startTime")
            private Date startTime;

            @XmlElement(name = "endTime")
            private Date endTime;

            public Date getStartTime() {
                return startTime;
            }

            public void setStartTime(Date startTime) {
                this.startTime = startTime;
            }

            public Date getEndTime() {
                return endTime;
            }

            public void setEndTime(Date endTime) {
                this.endTime = endTime;
            }

        }

        @XmlAccessorType(XmlAccessType.FIELD)
        public static class RealTime {
            @XmlElement(name = "time")
            private Date time;

            public Date getTime() {
                return time;
            }

            public void setTime(Date time) {
                this.time = time;
            }
        }

        @XmlAccessorType(XmlAccessType.FIELD)
        public static class FlowStatistics {
            @XmlElement(name = "countingLineID")
            private int countingLineID;

            @XmlElement(name = "pass")
            private int pass;

            @XmlElementWrapper(name = "movingDirectionList")
            @XmlElement(name = "MovingDirection")
            private List<MovingDirection> movingDirectionList;

            public int getCountingLineID() {
                return countingLineID;
            }

            public void setCountingLineID(int countingLineID) {
                this.countingLineID = countingLineID;
            }

            public int getPass() {
                return pass;
            }

            public void setPass(int pass) {
                this.pass = pass;
            }

            public List<MovingDirection> getMovingDirectionList() {
                return movingDirectionList;
            }

            public void setMovingDirectionList(List<MovingDirection> movingDirectionList) {
                this.movingDirectionList = movingDirectionList;
            }

            @XmlAccessorType(XmlAccessType.FIELD)
            public static class MovingDirection {
                @XmlElement(name = "countingLineSegmentID")
                private int countingLineSegmentID;

                @XmlElement(name = "count")
                private int count;

                public int getCountingLineSegmentID() {
                    return countingLineSegmentID;
                }

                public void setCountingLineSegmentID(int countingLineSegmentID) {
                    this.countingLineSegmentID = countingLineSegmentID;
                }

                public int getCount() {
                    return count;
                }

                public void setCount(int count) {
                    this.count = count;
                }
            }
        }
    }



    @XmlAccessorType(XmlAccessType.FIELD)
    public static class ValueCount {
        @XmlElement(name = "value")
        private String value;

        @XmlElement(name = "count")
        private int count;

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }
    }
}
